﻿CREATE PROCEDURE [dbo].[friends_get_by_userId]
    @userId int
AS
    SELECT 
        Users.Login,
        Users.Avatar
    FROM Users,Friends
    WHERE 
        (Users.UserId=Friends.FriendId and Friends.UserId = @userId) 
RETURN 0
